package com.yanjingzheng.entity;

/**
 * @Author Yenchingcheng
 * @Date 2023/9/11 11:21
 * @Description 形状装饰器类，抽象类，可以通过组合的方式持有其他装饰器对象
 **/
public abstract class ShapeDecorator implements Shape {
    protected Shape decoratedShape;

    public ShapeDecorator(Shape decoratedShape){
        this.decoratedShape = decoratedShape;
    }

    @Override
    public void draw() {
        decoratedShape.draw();
    }
}
